package cn.zhp.controller;

import cn.zhp.entity.Result;
import cn.zhp.service.SysResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/manager/menu")
public class SysResourceController {

    @Autowired
    SysResourceService service;

    @RequestMapping("list")
    public Result list(){
        return new Result(true,"操作成功",service.selectAll());
    }


    @RequestMapping("selectByRid")
    public Result selectByRid(long rid){
        return new Result(true,"操作成功",service.selectByRid(rid));
    }

    @RequestMapping("selectResources")
    public Result select(){
        return new Result(true,"操作成功",service.selectResources());
    }

}
